<?php
namespace app\branch\model;

use think\Session;
use think\Model;
use think\Request;

/**
 * 分公司管理员管理
 */
class Usercontrols extends model
{   
    use \app\common\traits\model\TraitModel;
    protected $table = 'users';
    protected $autoWriteTimestamp = 'timestamp';
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
    /**
     * [getUserList 会员列表]
     * @param  [type] $querys [description]
     * @return [type]         [description]
     */
    public function getUserList($querys=[])
    {
        return $this->getInfoList($querys);
    }
    public function caravancontrols()
    {
        return $this->hasMany('Caravancontrols','services');
    }
    /**
     * [getUserIofo 会员个人信息]
     * @param  [type] $id [description]
     * @return [type]     [description]
     */
    public function getUserIofo($id)
    {
        return $this->where('id',$id)->find(); 
    }
    public function getStatus($value)
    {
        $status = ['0'=>'未绑定','1'=>'已绑定'];
        return $status[$value];
    }
    /**
     * [getSexList 性别列表]
     * @return [type] [description]
     */
    public function getSex($sex)
    {
       $sex = ['0'=>'男', '1'=>'女','2'=>'保密'];
       return $sex;
    }

}
